﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using mock_ehr_lib.Data;

namespace mock_ehr_lib.tests
{
    [TestClass]
    public class PatientRepository
    {
        private JsonPatientRepository _jsonPatientRepository;

        [TestInitialize]
        public void Initialize()
        {
            _jsonPatientRepository = new JsonPatientRepository("Patients.js");
        }

        [TestMethod]
        public void LoadsPatientsFromJsonFile()
        {
            var patients = _jsonPatientRepository.GetAllPatients();
            Assert.AreEqual(3, patients.Count());
        }
    }
}
